package cc.mrbird.plan.service;

import cc.mrbird.common.domain.QueryRequest;
import cc.mrbird.plan.domain.Rehearse;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.util.List;

@CacheConfig(cacheNames = "RehearseeService")
public interface RehearseService {
  /*  List<Rehearse> findRehearses(Rehearse rehearse, QueryRequest request);*/

  /*  Rehearse findByName(String unit_name);*/
    @CacheEvict(allEntries = true)
    void add(Rehearse rehearse);
    @CacheEvict(key = "#p0", allEntries = true)
    void update(Rehearse rehearse);
    @CacheEvict(key = "#p0", allEntries = true)
    void delete(String ids);

    @Cacheable(key = "#p0")
    public Rehearse findById(Integer id);
}
